/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sistemareserva;

/**
 *
 * @author lucy
 */
public class SistemadeReserva extends javax.swing.JFrame {

    /**
     * Creates new form SistemadeReserva
     */
    public SistemadeReserva() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jDesktopPane2 = new javax.swing.JDesktopPane();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu8 = new javax.swing.JMenu();
        txtHotel = new javax.swing.JMenuItem();
        TxtReserva = new javax.swing.JMenuItem();
        txtHabitacion = new javax.swing.JMenuItem();
        txtUsuarios = new javax.swing.JMenuItem();
        txClientes = new javax.swing.JMenuItem();
        txtAdministrador = new javax.swing.JMenuItem();
        jMenu9 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        javax.swing.GroupLayout jDesktopPane2Layout = new javax.swing.GroupLayout(jDesktopPane2);
        jDesktopPane2.setLayout(jDesktopPane2Layout);
        jDesktopPane2Layout.setHorizontalGroup(
            jDesktopPane2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 807, Short.MAX_VALUE)
        );
        jDesktopPane2Layout.setVerticalGroup(
            jDesktopPane2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 545, Short.MAX_VALUE)
        );

        jMenuBar2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jMenu8.setText("Reserva de Hotel");

        txtHotel.setText("Hotel");
        txtHotel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtHotelActionPerformed(evt);
            }
        });
        jMenu8.add(txtHotel);

        TxtReserva.setText("Reserva");
        TxtReserva.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                TxtReservaActionPerformed(evt);
            }
        });
        jMenu8.add(TxtReserva);

        txtHabitacion.setText("TipoHabitacion");
        txtHabitacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtHabitacionActionPerformed(evt);
            }
        });
        jMenu8.add(txtHabitacion);

        txtUsuarios.setText("Usuarios");
        txtUsuarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtUsuariosActionPerformed(evt);
            }
        });
        jMenu8.add(txtUsuarios);

        txClientes.setText("Clientes");
        txClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txClientesActionPerformed(evt);
            }
        });
        jMenu8.add(txClientes);

        txtAdministrador.setText("Administrador Hotel");
        txtAdministrador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtAdministradorActionPerformed(evt);
            }
        });
        jMenu8.add(txtAdministrador);

        jMenuBar2.add(jMenu8);
        jMenuBar2.add(jMenu9);

        setJMenuBar(jMenuBar2);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane2)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane2)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void txtHotelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHotelActionPerformed
             // Se crea el objeto        
        Hotel h1 = new Hotel();
        // se añade al jDesktopPane
        jDesktopPane2.add(h1);
        //se muestra en pantalla
        h1.show();
      
    }//GEN-LAST:event_txtHotelActionPerformed

    private void txtUsuariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUsuariosActionPerformed
        // TODO add your handling code here:
        Usuarios h5 = new Usuarios();
        // se añade al jDesktopPane
        jDesktopPane2.add(h5);
        //se muestra en pantalla
        h5.show();
      
    }//GEN-LAST:event_txtUsuariosActionPerformed

    private void TxtReservaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TxtReservaActionPerformed
        // TODO add your handling code here:
           Reserva_1 h2 = new Reserva_1();
        // se añade al jDesktopPane
        jDesktopPane2.add(h2);
        //se muestra en pantalla
        h2.show();
    }//GEN-LAST:event_TxtReservaActionPerformed

    private void txClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txClientesActionPerformed
        // TODO add your hancdling code here:
          Clientes h3 = new Clientes();
        // se añade al jDesktopPane
        jDesktopPane2.add(h3);
        //se muestra en pantalla
        h3.show();
    }//GEN-LAST:event_txClientesActionPerformed

    private void txtHabitacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtHabitacionActionPerformed
        // TODO add your handling code here:
         TipoHabitacion_1 h4 = new TipoHabitacion_1();
        // se añade al jDesktopPane
        jDesktopPane2.add(h4);
        //se muestra en pantalla
        h4.show();
        
    }//GEN-LAST:event_txtHabitacionActionPerformed

    private void txtAdministradorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAdministradorActionPerformed
        // TODO add your handling code here:
        AdministradorHotel_1 h6 = new AdministradorHotel_1();
        // se añade al jDesktopPane
        jDesktopPane2.add(h6);
        //se muestra en pantalla
        h6.show();
      
    }//GEN-LAST:event_txtAdministradorActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(SistemadeReserva.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(SistemadeReserva.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(SistemadeReserva.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(SistemadeReserva.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new SistemadeReserva().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem TxtReserva;
    private javax.swing.JDesktopPane jDesktopPane2;
    private javax.swing.JMenu jMenu8;
    private javax.swing.JMenu jMenu9;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JMenuItem txClientes;
    private javax.swing.JMenuItem txtAdministrador;
    private javax.swing.JMenuItem txtHabitacion;
    private javax.swing.JMenuItem txtHotel;
    private javax.swing.JMenuItem txtUsuarios;
    // End of variables declaration//GEN-END:variables
}
